package spring.boot.client.common;

import io.netty.channel.Channel;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;

/**
 * 常量
 */
public final class NettyClientConstant {

    /**
     * 客户端重连频率，单位：秒
     */
    public static final int CLIENT_RECONNECT_SECONDS = 15;

    /**
     * 服务端 host
     */
    public static final String SERVER_HOST = "127.0.0.1";

    /**
     * 服务端 port
     */
    public static final int SERVER_PORT = 7777;

    /**
     * 线程组，用于客户端对服务端的链接、数据读写
     */
    public static final EventLoopGroup CLIENT_EVENT_GROUP = new NioEventLoopGroup();

    /**
     * Netty Client Channel
     */
    public static volatile Channel CLIENT_CHANNEL;

    /**
     * 心跳起始num
     */
    public static long HEART_START_NUM = 0L;

}
